package system.model;

import system.common.Constants;
import system.util.StringUtil;

/**
 * <pre>
 * Class : system.model.DB2_MsgIDto / DB2_MsgIDto.java
 * 	Define Class Object : 
 * <br>
 * </pre>
 * @author hwanLee / apexcns,Inc.
 * @version 1.1
 * @see javadoc
 * @since 2012. 9. 10.
 */
public class DB2_MsgIDto { 
	/* MI_MailData */
	private long MailIPFrom;
	private String MailTimeReceived;
	private String MailTimeSent;
	private String MailSubject;
	private String MailTextContent;
	
	/* MI_FileData */
	private String FileName;
	private String FileSize;
	private int FileIPFrom;
	private int FileIPTo;
	private String FileTime;
	
	/* Mail_BlockData */
	private int BlockSeq;
	private int BlockClientIP;
	private int BlockClientPort;
	private int BlockServerIP;
	private int BlockServerPort;
	private int BlockMailType;
	private String BlockTime;
	private String BlockDesc;
	private int BlockPID;
	private String BlockUID;
	private String BlockMID;
	private int BlockPolicyID;
	private String BlockOwnerGUID;

	/** <pre>
     * Method : DB2_MsgIDto.getMailIPFrom()
     * 	to get MailIPFrom
     * <br> 
     * @return the MailIPFrom : type of String
     * </pre>
     */
	public long getMailIPFrom() {
		return MailIPFrom;
	}
	/** <pre>
     * Method : DB2_MsgIDto.setMailIPFrom()
     * 	to set MailIPFrom
     * <br> 
     * @return the MailIPFrom : type of String
     * </pre>
     */
	public void setMailIPFrom(long MailIPFrom) {
		this.MailIPFrom = MailIPFrom;
	}
	/** <pre>
     * Method : DB2_MsgIDto.getMailTimeReceived()
     * 	to get MailTimeReceived
     * <br> 
     * @return the MailTimeReceived : type of String
     * </pre>
     */
	public String getMailTimeReceived() {
		return MailTimeReceived;
	}
	/** <pre>
     * Method : DB2_MsgIDto.setMailTimeReceived()
     * 	to set MailTimeReceived
     * <br> 
     * @return the MailTimeReceived : type of String
     * </pre>
     */
	public void setMailTimeReceived(String MailTimeReceived) {
		this.MailTimeReceived = MailTimeReceived;
	}
	/** <pre>
     * Method : DB2_MsgIDto.getMailTimeSent()
     * 	to get MailTimeSent
     * <br> 
     * @return the MailTimeSent : type of String
     * </pre>
     */
	public String getMailTimeSent() {
		return MailTimeSent;
	}
	/** <pre>
     * Method : DB2_MsgIDto.setMailTimeSent()
     * 	to set MailTimeSent
     * <br> 
     * @return the MailTimeSent : type of String
     * </pre>
     */
	public void setMailTimeSent(String MailTimeSent) {
		this.MailTimeSent = MailTimeSent;
	}
	/** <pre>
     * Method : DB2_MsgIDto.getMailSubject()
     * 	to get MailSubject
     * <br> 
     * @return the MailSubject : type of String
     * </pre>
     */
	public String getMailSubject() {
		return MailSubject;
	}
	/** <pre>
     * Method : DB2_MsgIDto.setMailSubject()
     * 	to set MailSubject
     * <br> 
     * @return the MailSubject : type of String
     * </pre>
     */
	public void setMailSubject(String MailSubject) {
		this.MailSubject = MailSubject;
	}
	/** <pre>
     * Method : DB2_MsgIDto.getMailTextContent()
     * 	to get MailTextContent
     * <br> 
     * @return the MailTextContent : type of String
     * </pre>
     */
	public String getMailTextContent() {
		return MailTextContent;
	}
	/** <pre>
     * Method : DB2_MsgIDto.setMailTextContent()
     * 	to set MailTextContent
     * <br> 
     * @return the MailTextContent : type of String
     * </pre>
     */
	public void setMailTextContent(String MailTextContent) {
		this.MailTextContent = MailTextContent;
	}
	/** <pre>
     * Method : DB2_MsgIDto.getFileName()
     * 	to get FileName
     * <br> 
     * @return the FileName : type of String
     * </pre>
     */
	public String getFileName() {
		return FileName;
	}
	/** <pre>
     * Method : DB2_MsgIDto.setFileName()
     * 	to set FileName
     * <br> 
     * @return the FileName : type of String
     * </pre>
     */
	public void setFileName(String FileName) {
		this.FileName = FileName;
	}
	/** <pre>
     * Method : DB2_MsgIDto.getFileSize()
     * 	to get FileSize
     * <br> 
     * @return the FileSize : type of String
     * </pre>
     */
	public String getFileSize() {
		return FileSize;
	}
	/** <pre>
     * Method : DB2_MsgIDto.setFileSize()
     * 	to set FileSize
     * <br> 
     * @return the FileSize : type of String
     * </pre>
     */
	public void setFileSize(String FileSize) {
		this.FileSize = FileSize;
	}
	/** <pre>
     * Method : DB2_MsgIDto.getFileIPFrom()
     * 	to get FileIPFrom
     * <br> 
     * @return the FileIPFrom : type of String
     * </pre>
     */
	public int getFileIPFrom() {
		return FileIPFrom;
	}
	/** <pre>
     * Method : DB2_MsgIDto.setFileIPFrom()
     * 	to set FileIPFrom
     * <br> 
     * @return the FileIPFrom : type of String
     * </pre>
     */
	public void setFileIPFrom(int FileIPFrom) {
		this.FileIPFrom = FileIPFrom;
	}
	/** <pre>
     * Method : DB2_MsgIDto.getFileIPTo()
     * 	to get FileIPTo
     * <br> 
     * @return the FileIPTo : type of String
     * </pre>
     */
	public int getFileIPTo() {
		return FileIPTo;
	}
	/** <pre>
     * Method : DB2_MsgIDto.setFileIPTo()
     * 	to set FileIPTo
     * <br> 
     * @return the FileIPTo : type of String
     * </pre>
     */
	public void setFileIPTo(int FileIPTo) {
		this.FileIPTo = FileIPTo;
	}
	/** <pre>
     * Method : DB2_MsgIDto.getFileTime()
     * 	to get FileTime
     * <br> 
     * @return the FileTime : type of String
     * </pre>
     */
	public String getFileTime() {
		return FileTime;
	}
	/** <pre>
     * Method : DB2_MsgIDto.setFileTime()
     * 	to set FileTime
     * <br> 
     * @return the FileTime : type of String
     * </pre>
     */
	public void setFileTime(String FileTime) {
		this.FileTime = FileTime;
	}
	/** <pre>
     * Method : DB2_MsgIDto.getBlockSeq()
     * 	to get BlockSeq
     * <br> 
     * @return the BlockSeq : type of String
     * </pre>
     */
	public int getBlockSeq() {
		return BlockSeq;
	}
	/** <pre>
     * Method : DB2_MsgIDto.setBlockSeq()
     * 	to set BlockSeq
     * <br> 
     * @return the BlockSeq : type of String
     * </pre>
     */
	public void setBlockSeq(int BlockSeq) {
		this.BlockSeq = BlockSeq;
	}
	/** <pre>
     * Method : DB2_MsgIDto.getBlockClientIP()
     * 	to get BlockClientIP
     * <br> 
     * @return the BlockClientIP : type of String
     * </pre>
     */
	public int getBlockClientIP() {
		return BlockClientIP;
	}
	/** <pre>
     * Method : DB2_MsgIDto.setBlockClientIP()
     * 	to set BlockClientIP
     * <br> 
     * @return the BlockClientIP : type of String
     * </pre>
     */
	public void setBlockClientIP(int BlockClientIP) {
		this.BlockClientIP = BlockClientIP;
	}
	/** <pre>
     * Method : DB2_MsgIDto.getBlockClientPort()
     * 	to get BlockClientPort
     * <br> 
     * @return the BlockClientPort : type of String
     * </pre>
     */
	public int getBlockClientPort() {
		return BlockClientPort;
	}
	/** <pre>
     * Method : DB2_MsgIDto.setBlockClientPort()
     * 	to set BlockClientPort
     * <br> 
     * @return the BlockClientPort : type of String
     * </pre>
     */
	public void setBlockClientPort(int BlockClientPort) {
		this.BlockClientPort = BlockClientPort;
	}
	/** <pre>
     * Method : DB2_MsgIDto.getBlockServerIP()
     * 	to get BlockServerIP
     * <br> 
     * @return the BlockServerIP : type of String
     * </pre>
     */
	public int getBlockServerIP() {
		return BlockServerIP;
	}
	/** <pre>
     * Method : DB2_MsgIDto.setBlockServerIP()
     * 	to set BlockServerIP
     * <br> 
     * @return the BlockServerIP : type of String
     * </pre>
     */
	public void setBlockServerIP(int BlockServerIP) {
		this.BlockServerIP = BlockServerIP;
	}
	/** <pre>
     * Method : DB2_MsgIDto.getBlockServerPort()
     * 	to get BlockServerPort
     * <br> 
     * @return the BlockServerPort : type of String
     * </pre>
     */
	public int getBlockServerPort() {
		return BlockServerPort;
	}
	/** <pre>
     * Method : DB2_MsgIDto.setBlockServerPort()
     * 	to set BlockServerPort
     * <br> 
     * @return the BlockServerPort : type of String
     * </pre>
     */
	public void setBlockServerPort(int BlockServerPort) {
		this.BlockServerPort = BlockServerPort;
	}
	/** <pre>
     * Method : DB2_MsgIDto.getBlockMailType()
     * 	to get BlockMailType
     * <br> 
     * @return the BlockMailType : type of String
     * </pre>
     */
	public int getBlockMailType() {
		return BlockMailType;
	}
	/** <pre>
     * Method : DB2_MsgIDto.setBlockMailType()
     * 	to set BlockMailType
     * <br> 
     * @return the BlockMailType : type of String
     * </pre>
     */
	public void setBlockMailType(int BlockMailType) {
		this.BlockMailType = BlockMailType;
	}
	/** <pre>
     * Method : DB2_MsgIDto.getBlockTime()
     * 	to get BlockTime
     * <br> 
     * @return the BlockTime : type of String
     * </pre>
     */
	public String getBlockTime() {
		return BlockTime;
	}
	/** <pre>
     * Method : DB2_MsgIDto.setBlockTime()
     * 	to set BlockTime
     * <br> 
     * @return the BlockTime : type of String
     * </pre>
     */
	public void setBlockTime(String BlockTime) {
		this.BlockTime = BlockTime;
	}
	/** <pre>
     * Method : DB2_MsgIDto.getBlockDesc()
     * 	to get BlockDesc
     * <br> 
     * @return the BlockDesc : type of String
     * </pre>
     */
	public String getBlockDesc() {
		return BlockDesc;
	}
	/** <pre>
     * Method : DB2_MsgIDto.setBlockDesc()
     * 	to set BlockDesc
     * <br> 
     * @return the BlockDesc : type of String
     * </pre>
     */
	public void setBlockDesc(String BlockDesc) {
		this.BlockDesc = BlockDesc;
	}
	/** <pre>
     * Method : DB2_MsgIDto.getBlockPID()
     * 	to get BlockPID
     * <br> 
     * @return the BlockPID : type of String
     * </pre>
     */
	public int getBlockPID() {
		return BlockPID;
	}
	/** <pre>
     * Method : DB2_MsgIDto.setBlockPID()
     * 	to set BlockPID
     * <br> 
     * @return the BlockPID : type of String
     * </pre>
     */
	public void setBlockPID(int BlockPID) {
		this.BlockPID = BlockPID;
	}
	/** <pre>
     * Method : DB2_MsgIDto.getBlockUID()
     * 	to get BlockUID
     * <br> 
     * @return the BlockUID : type of String
     * </pre>
     */
	public String getBlockUID() {
		return BlockUID;
	}
	/** <pre>
     * Method : DB2_MsgIDto.setBlockUID()
     * 	to set BlockUID
     * <br> 
     * @return the BlockUID : type of String
     * </pre>
     */
	public void setBlockUID(String BlockUID) {
		this.BlockUID = BlockUID;
	}
	/** <pre>
     * Method : DB2_MsgIDto.getBlockMID()
     * 	to get BlockMID
     * <br> 
     * @return the BlockMID : type of String
     * </pre>
     */
	public String getBlockMID() {
		return BlockMID;
	}
	/** <pre>
     * Method : DB2_MsgIDto.setBlockMID()
     * 	to set BlockMID
     * <br> 
     * @return the BlockMID : type of String
     * </pre>
     */
	public void setBlockMID(String BlockMID) {
		this.BlockMID = BlockMID;
	}
	/** <pre>
     * Method : DB2_MsgIDto.getBlockPolicyID()
     * 	to get BlockPolicyID
     * <br> 
     * @return the BlockPolicyID : type of String
     * </pre>
     */
	public int getBlockPolicyID() {
		return BlockPolicyID;
	}
	/** <pre>
     * Method : DB2_MsgIDto.setBlockPolicyID()
     * 	to set BlockPolicyID
     * <br> 
     * @return the BlockPolicyID : type of String
     * </pre>
     */
	public void setBlockPolicyID(int BlockPolicyID) {
		this.BlockPolicyID = BlockPolicyID;
	}
	/** <pre>
     * Method : DB2_MsgIDto.getBlockOwnerGUID()
     * 	to get BlockOwnerGUID
     * <br> 
     * @return the BlockOwnerGUID : type of String
     * </pre>
     */
	public String getBlockOwnerGUID() {
		return BlockOwnerGUID;
	}
	/** <pre>
     * Method : DB2_MsgIDto.setBlockOwnerGUID()
     * 	to set BlockOwnerGUID
     * <br> 
     * @return the BlockOwnerGUID : type of String
     * </pre>
     */
	public void setBlockOwnerGUID(String BlockOwnerGUID) {
		this.BlockOwnerGUID = BlockOwnerGUID;
	}

	public String toStringMailOld() {
	    String delimiter = Constants.delimiter;

	    String res = MailIPFrom + delimiter;
	    res += StringUtil.rTrim(MailTimeReceived) + delimiter;
	    res += StringUtil.rTrim(MailTimeSent) + delimiter;
	    res += StringUtil.rTrim(MailSubject) + delimiter;
	    res += StringUtil.convertColumnData(MailTextContent, 1).trim() + delimiter + "\n";
	    
	    return res;
	}

	public String toStringMail() {
	    String delimiter = Constants.delimiter;

	    String res = MailIPFrom + delimiter;
	    res += StringUtil.rTrim(MailTimeReceived) + delimiter;
	    res += StringUtil.rTrim(MailTimeSent) + delimiter;
	    res += StringUtil.rTrim(MailSubject) + delimiter;
	    res += StringUtil.convertColumnData(MailTextContent, 1).trim() + delimiter;
	    res += StringUtil.rTrim(FileName) + delimiter;
	    res += StringUtil.rTrim(FileSize) + "\n";
	    
	    return res;
	}

	public String toStringFile() {
	    String delimiter = Constants.delimiter;

	    String res = StringUtil.rTrim(FileName) + delimiter;
	    res += StringUtil.rTrim(FileSize) + delimiter;
	    res += FileIPFrom + delimiter;
	    res += FileIPTo + delimiter;
	    res += StringUtil.rTrim(FileTime) + "\n";
	    
	    return res;
	}

	public String toStringBlock() {
	    String delimiter = Constants.delimiter;

	    String res = BlockSeq + delimiter;
	    res += BlockClientIP + delimiter;
	    res += BlockClientPort + delimiter;
	    res += BlockServerIP + delimiter;
	    res += BlockServerPort + delimiter;
	    res += BlockMailType + delimiter;
	    res += StringUtil.rTrim(BlockTime) + delimiter;
	    res += StringUtil.rTrim(BlockDesc) + delimiter;
	    res += BlockPID + delimiter;
	    res += StringUtil.rTrim(BlockUID) + delimiter;
	    res += StringUtil.rTrim(BlockMID) + delimiter;
	    res += BlockPolicyID + delimiter;
	    res += StringUtil.rTrim(BlockOwnerGUID) + "\n";
	    
	    return res;
	}
}
